package com.stedu.mall.common.service;

import com.stedu.mall.common.bean.Admin;
import com.stedu.mall.common.exception.SteduException;

import java.util.List;
import java.util.Map;

public interface AdminService {
    Admin login (String username, String password) throws SteduException;
    //增加
    boolean insert(Admin admin) throws SteduException;

    //根据分类id删除
    boolean delete(Integer id) throws SteduException;

    //根据分类id修改
    boolean update(Admin admin) throws SteduException;
    boolean back(Integer id) throws SteduException;

    //修改密码
    boolean changePwd(String oldPwd,String newPwd,Integer id) throws SteduException;
    //重置密码
    //boolean again(Admin admin) throws SteduException;
    //分页条件搜索
    Object selectByCondition(Admin condition, Integer pageNum, Integer pageSize);

    //根据id查询
    Admin selectById(Integer id);

    List<Map<String, Object>> selectTop5Dept();

    List<Map<String, Object>> selectUserOrder();
}
